import static org.junit.Assert.*;
import org.junit.Test;

public class StudentTestSolutions {
    @Test
    public void testStudentNotEquals() {
    	Student student1 = new Student("Thoreau", "Henry", 1, 0);
    	Student student2 = new Student("Thoreau", "Larry", 1, 0);
    	boolean result = student1.equals(student2);
    	assertFalse(result);
    }
    
    @Test
    public void testStudentEquals() {
        assertEquals(new Student("Thoreau", "Henry", 1, 0), new Student("Thoreau", "Henry", 1, 0));
    }

    @Test
    public void testStudentNotEqualsNonStudent() {  	
    	Student student1 = new Student("Thoreau", "Henry", 1, 0);
    	boolean result = student1.equals(5);
    	assertFalse(result);
    }
    
    @Test
    public void testStudentNotEqualsNull() {  	
    	Student student1 = new Student("Thoreau", "Henry", 1, 0);
    	boolean result = student1.equals(null);
    	assertFalse(result);
    }
    
    @Test
    public void testStudentCompareToLessThan() {  	
    	Student student1 = new Student("Thoreau", "Elephant", 1, 0);
    	Student student2 = new Student("Thoreau", "Giraffe", 1, 0);
    	int result = student1.compareTo(student2);
    	assertTrue(result < 0);
    }
    
    @Test
    public void testStudentCompareToGreaterThan() {  	
    	Student student1 = new Student("Thoreau", "Elephant", 1, 0);
    	Student student2 = new Student("Thoreau", "Giraffe", 1, 0);
    	int result = student2.compareTo(student1);
    	assertTrue(result > 0);
    }
}
